/**
 * 自定义数据校验库
 * Created by jaosnZhang on 2017/11/28.
 */

let validator = {

    isUserName: function (str) {
    	return /^[a-zA-Z][a-zA-Z0-9_]{4,11}$/.test(str);
	},

    isPsd: function (str) {
    	return /(?!^\\d+$)(?!^[a-zA-Z]+$)(?!^[_#@]+$).{5,}/.test(str);
	}

};



module.exports = validator;